#ifndef _TEST_GAME_OBJECT_
#define _TEST_GAME_OBJECT_
#include <WinSock2.h>

#include "aerial\Game\GameObject\GameObject.h"

#define TYPE_TEST_OBJECT 0x2

class TestGameObject: public GameObject
{
public:
	TestGameObject(float x, float y, DWORD color, int id):GameObject(x, y, id), col(color), hp(100) {
		spr = hgeResMan->GetSprite("spr.fighter");
		b2CircleShape circle;
		circle.m_radius = 0.5f;

		b2FixtureDef fixtureDef;
		fixtureDef.shape = &circle;
		fixtureDef.density = 1.f;
		fixtureDef.friction = 1.f;
		fixtureDef.restitution = .2f;

		body->CreateFixture(&fixtureDef);
	}

	void accLeft()	{	body->ApplyForceToCenter(b2Vec2( -3.f,  0.f));		}
	void accRight() {	body->ApplyForceToCenter(b2Vec2(  3.f,  0.f));		}
	void accUp()	{	body->ApplyForceToCenter(b2Vec2(  0.f, -3.f));		}
	void accDown()	{	body->ApplyForceToCenter(b2Vec2(  0.f,  3.f));		}


	void render()	{	
		spr->SetColor(col);
		spr->RenderEx(T.x, T.y, A, 0.4f, 0.4f);	
	}
	virtual uchar GetObjectType() { return TYPE_TEST_OBJECT; }
	float hp;
	
private:
	hgeSprite* spr;
	DWORD col;
};

#endif